<?php
/**
 * @Author:: HuangYin
 * @DateTime: 2017-01-10 14:47
 *
 * @Description: Application Routes
 */

// Admin
{
    // List
    $app->get('admin', ['uses' => 'AdminController@index']);
    // Detail
    $app->get('admin/{id}', ['uses' => 'AdminController@detail']);
    // Create
    $app->post('admin', ['uses' => 'AdminController@created']);
    // Update
    $app->post('admin/{id}', ['uses' => 'AdminController@updated']);
    // Update password
    $app->post('admin/updatePwd/{id}', ['uses' => 'AdminController@updatePwd']);
    // Reset password
    $app->get('admin/reset/{id}', ['uses' => 'AdminController@resetPwd']);
    // Operation list
    $app->get('admin/operation/list', ['uses' => 'AdminController@operationList']);
    // Logout
    $app->get('logout', ['uses' => 'AdminController@logout']);
}
// Faq
{
    // List
    $app->get('faq', ['uses' => 'FaqController@index']);
    // Detail
    $app->get('faq/{id}', ['uses' => 'FaqController@detail']);
}
// Feedback
{
    // List
    $app->get('feedback', ['uses' => 'FeedbackController@index']);
    // Created
    $app->post('feedback', ['uses' => 'FeedbackController@created']);
}
// Goods
{
    // List
    $app->get('goods', ['uses' => 'GoodsController@index']);
    // Init
    $app->get('init/goods', ['uses' => 'GoodsController@initGoods']);
    // Detail
    $app->get('goods/{id}', ['uses' => 'GoodsController@detail']);
    // Detail By
    $app->post('goods/detail', ['uses' => 'GoodsController@findBy']);
    // Create
    $app->post('goods', ['uses' => 'GoodsController@created']);
    // Update
    $app->post('goods/{id}', ['uses' => 'GoodsController@updated']);
    // Update Status
    $app->post('goods/status/{id}', ['uses' => 'GoodsController@updateStatus']);

    // Category List
    $app->get('goods/category/list', ['uses' => 'GoodsCategoryController@index']);
    // Init
    $app->get('init/category', ['uses' => 'GoodsCategoryController@initCategory']);
    // Category Detail
    $app->get('goods/category/{id}', ['uses' => 'GoodsCategoryController@detail']);
    // Category Create
    $app->post('goods/category/created', ['uses' => 'GoodsCategoryController@created']);
    // Category Update
    $app->post('goods/category/{id}', ['uses' => 'GoodsCategoryController@updated']);

    $app->get('goods/taocang/list', ['uses' => 'GoodsController@taocangList']);


//


}
//taocang
{
    $app->get('taocang',['uses' => 'TaoCangController@index']);
    $app->post('taocang/created', ['uses' => 'TaoCangController@created']);
    $app->get('taocang/type', ['uses' => 'TaoCangTypeController@index']);
    $app->get('taocang/goods', ['uses' => 'TaoCangController@goodsList']);
    $app->post('taocang/{id}', ['uses' => 'TaoCangController@updated']);
    $app->get('taocang/findzr/{id}', ['uses' => 'TaoCangController@findzr']);

}
// Member
{
    // List
    $app->get('member', ['uses' => 'MemberController@index']);
    // Init
    $app->get('init/member', ['uses' => 'MemberController@initMember']);
    // Detail
    $app->get('member/{id}', ['uses' => 'MemberController@detail']);
    // Detail By Phone
    $app->post('member/phone', ['uses' => 'MemberController@findByPhone']);
    // Detail By Number
    $app->post('member/number', ['uses' => 'MemberController@findByNumber']);
    // Create
    $app->post('member', ['uses' => 'MemberController@created']);
    // Update
    $app->post('member/{id}', ['uses' => 'MemberController@updated']);

    // Integral List
    $app->get('member/integral/list', ['uses' => 'MemberIntegralController@index']);
    // Integral Detail
    $app->get('member/integral/{id}', ['uses' => 'MemberIntegralController@detail']);

    // Recharge List
    $app->get('member/recharge/list', ['uses' => 'MemberRechargeController@index']);
    // Recharge Detail
    $app->get('member/recharge/{id}', ['uses' => 'MemberRechargeController@detail']);
    // Recharge Create
    $app->post('member/recharge/created', ['uses' => 'MemberRechargeController@created']);
    // Recharge Update
    $app->post('member/recharge/{id}', ['uses' => 'MemberRechargeController@updated']);
    // Ticket
    $app->post('member/ticket/detail', ['uses' => 'MemberController@ticket']);
}
// Menu
{
    // List
    $app->get('menu', ['uses' => 'MenuController@index']);
    // Detail
    $app->get('menu/{id}', ['uses' => 'MenuController@detail']);
    // Create
    $app->post('menu', ['uses' => 'MenuController@created']);
    // Update
    $app->post('menu/{id}', ['uses' => 'MenuController@updated']);
}
// Order
{
    // Cart List
    $app->get('order/cart', ['uses' => 'OrderCartController@index']);
    // Cart Create
    $app->post('order/cart', ['uses' => 'OrderCartController@created']);
    // Cart UpdateCount
    $app->post('order/cart/{id}', ['uses' => 'OrderCartController@updateCount']);
    // Cart Delete
    $app->post('order/delete', ['uses' => 'OrderCartController@deleted']);
    // Cart Clear
    $app->post('order/clear', ['uses' => 'OrderCartController@clear']);

    // List
    $app->get('order', ['uses' => 'OrderController@index']);
    // Detail
    $app->get('order/{id}', ['uses' => 'OrderController@detail']);
    // Create
    $app->post('order', ['uses' => 'OrderController@created']);
    // Purchasing
    $app->get('order/purchasing/{id}', ['uses' => 'OrderController@purchasing']);
    // Confirm
    $app->get('order/confirm/{id}', ['uses' => 'OrderController@confirm']);
}
// Registration
{
    // List
    $app->get('registration', ['uses' => 'RegistrationController@index']);
    // Detail
    $app->get('registration/{id}', ['uses' => 'RegistrationController@detail']);
    // Create
    $app->post('registration', ['uses' => 'RegistrationController@created']);
}
// Role
{
    // List
    $app->get('role', ['uses' => 'RoleController@index']);
    // Detail
    $app->get('role/{id}', ['uses' => 'RoleController@detail']);
    // Create
    $app->post('role', ['uses' => 'RoleController@created']);
    // Update
    $app->post('role/{id}', ['uses' => 'RoleController@updated']);
}
// Setting
{
    // List
    $app->get('setting', ['uses' => 'SettingController@index']);
    // Detail
    $app->get('setting/{id}', ['uses' => 'SettingController@detail']);
    // Create
    $app->post('setting', ['uses' => 'SettingController@created']);
    // Update
    $app->post('setting/{id}', ['uses' => 'SettingController@updated']);
}
// Shopping
{
    // Cart List
    $app->get('shopping/cart', ['uses' => 'ShoppingCartController@index']);
    // Cart Create
    $app->post('shopping/cart', ['uses' => 'ShoppingCartController@created']);
    // Cart UpdateCount
    $app->post('shopping/cart/{id}', ['uses' => 'ShoppingCartController@updateCount']);
    // Cart Delete
    $app->post('shopping/delete', ['uses' => 'ShoppingCartController@deleted']);
    // Cart Clear
    $app->post('shopping/clear', ['uses' => 'ShoppingCartController@clear']);

    // Cart Pending List
    $app->get('shopping/pending', ['uses' => 'ShoppingCartController@pending']);
    // Cart Pending Detail
    $app->post('shopping/pending', ['uses' => 'ShoppingCartController@pendingDetail']);
    // Cart createdPending
    $app->post('shopping/created', ['uses' => 'ShoppingCartController@createdPending']);
    // Cart cancelPending
    $app->post('shopping/cancel', ['uses' => 'ShoppingCartController@cancelPending']);
    // Cart getPending
    $app->post('shopping/get', ['uses' => 'ShoppingCartController@getPending']);

    // List
    $app->get('shopping', ['uses' => 'ShoppingController@index']);
    // Detail
    $app->get('shopping/{id}', ['uses' => 'ShoppingController@detail']);
    // Detail By Out trade no.
    $app->post('shopping/detail', ['uses' => 'ShoppingController@findByNumber']);
    // Create
    $app->post('shopping', ['uses' => 'ShoppingController@created']);
    // Sync
    $app->get('sync', ['uses' => 'ShoppingController@sync']);
    // Sync Amount
    $app->get('syncAmount', ['uses' => 'ShoppingController@syncAmount']);
    // Refund Created
    $app->post('shopping/refund', ['uses' => 'ShoppingController@refund']);
    // Refund List
    $app->get('shopping/refund/list', ['uses' => 'ShoppingController@refundList']);
    // Refund Detail
    $app->get('shopping/refund/detail/{id}', ['uses' => 'ShoppingController@refundDetail']);
    // Refund Sync
    $app->get('shopping/refund/sync', ['uses' => 'ShoppingController@syncRefund']);
    // Refund Sync Amount
    $app->get('shopping/refund/syncAmount', ['uses' => 'ShoppingController@syncAmountRefund']);
    // Ticket
    $app->post('shopping/ticket', ['uses' => 'ShoppingController@ticket']);
}
// Shift Exchange
{
    // List
    $app->get('shift', ['uses' => 'ShiftExchangeController@index']);
    // Check
    $app->post('shift/check', ['uses' => 'ShiftExchangeController@check']);
    // Detail
    $app->get('shift/{id}', ['uses' => 'ShiftExchangeController@detail']);
    // Inventory
    $app->post('shift/inventory', ['uses' => 'ShiftExchangeController@inventory']);
    // Exchange
    $app->post('shift', ['uses' => 'ShiftExchangeController@exchange']);
}
// Payment
{
    $app->post('payments', ['uses' => 'PaymentController@payment']);
}